package com.example.studywords.sql;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import com.example.studywords.bean.WordInfoBean;

import java.util.List;

@Dao
public interface WordInfoDao {
    @Insert
    void insert(WordInfoBean wordInfoBean);
    @Update
    void update(WordInfoBean wordInfoBean);
    @Query("SELECT * FROM word_info WHERE infoChildWordId = :wordId")
    WordInfoBean selectWordInfo(int wordId);
    @Query("SELECT infoChildWordId FROM word_info WHERE correctNum = :correctNum")
    List<Integer> selectWordWithCorrectNum(int correctNum);
}
